Fix Windows startup crash: permission IPC pipe path and null guard (#… - #462
Merged
parsakhaz merged 1 commit intoAug 18, 2026
Merged
Conversation
Member
|
Maintainer validation on the exact patch: |
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes two bugs causing Pane to crash on startup on Windows (2.4.60 regression).
Closes #460.
Bug 1 —
permissionIpcServer.tsuses a filesystem path for the socket on Windows.On Windows,
net.Server.listen(path)expects a named pipe (\\.\pipe\<name>), not a filesystem path. The existing code passes a path likeC:\Users\<user>\.pane\sockets\pane-permissions-<pid>.sock, which fails with EACCES on every launch. Fixed by platform-branching the socket path to use a named pipe on Windows, and skipping thefs.existsSync/fs.unlinkSyncsocket cleanup since Windows named pipes are not filesystem entries.Bug 2 —
cliManagerFactory.tsnull guard passes null intodecodeBoundary.When Bug 1 causes the permission IPC server to fail,
permissionIpcPathstaysnull. The guard checks!== undefined, which passesnullthrough todecodeBoundary, throwinginput: expected stringand crashing service initialization. Fixed by adding a!== nullcheck to match the codebase's prevailing convention. (typeof === 'string'was the obvious fix but the repo'sno-runtime-typeofoxlint rule blocks it.)Type of Change
Checklist
pnpm typecheckandpnpm lintlocallypnpm electron-devCritical Areas Modified
Screenshots (if applicable)
Before fix (2.4.60 on Windows):
[Permission IPC] Server error: listen EACCES: permission denied C:\Users.pane\sockets\pane-permissions-.sock
[CliToolRegistry] Failed to create manager for tool 'claude': Error: input: expected string
UnhandledPromiseRejectionWarning: Error: Failed to create manager for CLI tool 'claude'
After fix:
[Main] Permission IPC server started successfully
[Main] Permission IPC socket path: .\pipe\pane-permissions-
[CliManagerFactory] Created claude manager successfully
[Main] Services initialized, creating window...
[Main] Window created successfully
Additional Notes
Two files changed, 8 insertions, 6 deletions. No new tests added — both fixes are guard/path changes in existing initialization code. The
PaneDaemonServerin the same codebase already handles Windows named pipes correctly;permissionIpcServerwas the one place that kept the Unix socket assumption.Two files changed, 8 insertions, 6 deletions. No new tests added — both fixes are guard/path changes in existing initialization code. The
PaneDaemonServerin the same codebase already handles Windows named pipes correctly;permissionIpcServerwas the one place that kept the Unix socket assumption.Note: When testing locally with
npx electron .(running the main, frontend, and electron processes separately —pnpm run electron-devdoesn't work on Windows due to bash variable expansion in the script), the app initializes fully and reaches "Window created successfully" but the renderer shows a "Open Pane from the desktop app" fallback instead of the full UI. This happens on upstream/main without my changes as well — it appears to be a pre-existing dev environment issue wherewindow.electronAPIis not injected in the dev build on Windows. The preload script exists at the expected path and the main process logs confirm all services initialize correctly. Flagging this in case others have a known workaround for local dev testing on Windows.